<%@ page language="java" pageEncoding="UTF-8"%>
<%@include file="/global/global-head.jsp" %>
<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>吉车惠后台管理系统</title>
	<%@include file="/global/global-other.jsp" %>
	<script type="text/javascript">
		var $bn_oilStaion_list = new Object();
		var $bn_oilStaion_list_Datagrid;
		var $bn_oilStaion_list_toolbar = [{
			text:'<i class="fa fa-search " aria-hidden="true"></i>查询',
				handler:function(){
					$bn_oilStaion_list.reload();
				}
			}
		];
		$(function(){
			$bn_oilStaion_list_Datagrid = $('#bn_oilStaionDatagrid').datagrid({
				filterBtnIconCls:'icon-filter',
				queryParams: {
					filter_EQ_delete_status: 0
				},
				pageSize : 20,
				remoteFilter:true
			});
			$bn_oilStaion_list_Datagrid.datagrid('enableFilter', [
				{field:'cityCode',type:'label'},
				{
					field:'countyCode',
					type:'combobox',
					options:{
						valueField: 'code',
						textField: 'name',
						url:'${ctx}/tcode/all/method?method=getCacheCdCounty'
					},
					op:['equal']
				},
				{
					field:'oilCompanyCode',
					type:'combobox',
					options:{
						valueField: 'code',
						textField: 'name',
						url:'${ctx}/tcode/all/method?method=getCacheCdOilCompanies'
					},
					op:['equal']
				},
				{field:'oilStationName',type:'text'},
				{field:'oilStationShortName',type:'text'},
				{field:'keyword',type:'text'},
				{field:'lat',type:'label'},
				{field:'lng',type:'label'},
				{field:'address',type:'text'},
				{field:'erpCode',type:'text'},
				{field:'hosCode',type:'text'},
				{field:'createBy',type:'text'},
				{field:'updateBy',type:'text'}

			]);

		});


		$bn_oilStaion_list.test=function(a){

		}

		$bn_oilStaion_list.reload = function(){
			$("#bn_oilStaionDatagrid").datagrid('reload');
		};

		var viewDialog = null;
		$bn_oilStaion_list.saveInit = function(){

		}

		//编辑
		$bn_oilStaion_list.updateInit = function (){

		}
		$bn_oilStaion_list.delete = function (){

		}
		$(function() {
			submitForm = function($dialog,$menusmap){
				var row = $bn_oilStaion_list_Datagrid.datagrid('getSelected');
				if(row == null){
					$.messager.alert("提示",errMsg("请选择一行数据！"),"error");
				}
				var oilStationId = row.oilStationId;
				var oilStationName = row.oilStationName;
				$menusmap.setOilStation(oilStationId,oilStationName);
				$dialog.close();
			};
		})

	</script>
</head>
<body>
<div class="easyui-layout" data-options="fit:true">
	<div data-options="region:'center',border:false">
		<table id="bn_oilStaionDatagrid"  style="width:100%;height: 100%"
			   data-options="border:false,rownumbers:true,autoRowHeight:false,singleSelect:true,pagination:true,sortName:'createAt',sortOrder:'desc',toolbar:$bn_oilStaion_list_toolbar,rowStyler: function(index,row){return {style:'height:30px'};},url:'${ctx}/bn/oil/search?_m=load',method:'post'">
			<thead>
			<tr>
				<th data-options="field:'cityCode',width:100,align:'center',formatter:function(value,row,index){return row.cityCodeName;}">城市代码</th>
				<th data-options="field:'countyCode',width:120,align:'center',formatter:function(value,row,index){return row.countyCodeName;}">区、县</th>
				<th data-options="field:'oilCompanyCode',width:120,align:'center',formatter:function(value,row,index){return row.oilCompanyCodeName;}">石油公司</th>
				<th data-options="field:'oilStationName',width:150,align:'center'">加油站全称</th>
				<th data-options="field:'oilStationShortName',width:150,align:'center'">加油站简称</th>
				<th data-options="field:'keyword',width:80,align:'center'">关键字</th>
				<th data-options="field:'lat',width:100,align:'center'">纬度</th>
				<th data-options="field:'lng',width:120,align:'center'">经度</th>
				<th data-options="field:'address',width:150,align:'center'">地址</th>
				<th data-options="field:'erpCode',width:100,align:'center'">erpCode</th>
				<th data-options="field:'hosCode',width:100,align:'center'">hosCode</th>
				<th data-options="field:'createBy',width:80,align:'center'">创建人</th>
				<th data-options="field:'updateBy',width:80,align:'center'">修改人</th>
			</tr>
			</thead>
		</table>
	</div>
</div>
</body>
</html>